<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function f() {
            var j1 = document.getElementById("j1");
            var j2 = document.getElementById("j2");
            var he = document.getElementById("he");
            he.value=Number(j1.value)+ Number(j2.value);
        }
    </script>
</head>
<body>
<input id="j1" type="text" />+<input  id="j2" type="text" /><input type="button" value="=" onclick="f()"/><input id="he" type="text" />
</body>
</html>